package com.sunyur.tailor.channel.web.outer.currency.dto;

import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @Author 99288
 * @Description 批量同步汇率入参实体类
 * @Date 12:03 2021/12/30
 * @Param 
 * @return 
**/
@Data
public class BatchSyncCurrencyDTO {
   @NotEmpty(message = "来源币种不能为空")
   @Size(max = 32, message = "来源币种长度不能超过32")
   private String originalCode;

   @NotEmpty(message = "目标币种不能为空")
   @Size(max = 32, message = "目标币种长度不能超过32")
   private String targetCode;

   @NotNull(message = "汇率值不能为空")
   @Digits(integer = 16, fraction = 8, message = "汇率值整数位不能超过16位，小数位不能超过8位")
   private BigDecimal rate;

   @NotEmpty(message = "汇率类型不能为空")
   @Size(max = 32, message = "汇率类型长度不能超过32")
   private String typeCode;

   @NotNull(message = "开始时间不能为空")
   private Date startTime;

   @NotNull(message = "结束时间不能为空")
   private Date endTime;
}
